class open_menu :
    def __init__ ( self , mediator ) :
        self . _awake = False
        self . _mediator = mediator
        self . _entry_text_in_browser = None
    def entry_text_in_browser_reply ( self , text ) :
        self . _entry_text_in_browser = text
    def show_open_menu ( self ) :
        self . _awake = True
        self . _mediator . configure_title_text_for_browser ( self . _mediator . localization_open_menu_title ( ) )
        self . _mediator . configure_action_text_for_browser ( self . _mediator . localization_open_menu_open ( ) )
        self . _mediator . configure_action_title_name_text_for_browser ( self . _mediator . localization_open_menu_new_name ( ) )
        self . _mediator . configure_unique_or_existing_names_mode_for_browser ( )
        self . _mediator . configure_title_text_when_no_entries_for_browser ( self . _mediator . localization_open_menu_no_entries ( ) )
        self . _mediator . configure_remove_action_part_when_no_entries_for_browser ( )
        self . _mediator . show_browser ( )
    def hide_open_menu ( self ) :
        self . _awake = False
        self . _mediator . hide_browser ( )
    def on_browser_return ( self ) :
        if self . _awake :
            self . _mediator . on_open_menu_return ( )
    def on_browser_action ( self ) :
        if self . _awake :
            self . _mediator . entry_text_in_browser_request ( )
            self . _mediator . select_knowledge_base_for_editing ( self . _entry_text_in_browser )
            self . _mediator . on_open_menu_base_opened ( )
